<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let arr1=[1,2,3,4,5]
        let arr2=arr1.map(item=>item*2)
        console.log(arr2)

        let arr3=arr1.map(item=>'a'+item)
        console.log(arr3)

        let arr4=[
            {name:'apple',price:88,num:30},
            {name:'orange',price:80,num:32},
            {name:'banana',price:45,num:34},
            {name:'water',price:20,num:38}
        ]
        let arr5=arr4.map(item=>item.name)
        console.log(arr5)

        let arr6=arr4.map(item=>({
            attr1:item.name,
            arrt2:item.num
        }))
        console.log(arr6)
    </script>
    
</body>
</html>